package com.zdp.degisn.pipe_filter.entity;

import lombok.Data;

/**
 * @author zhengdp
 * @Description
 * @Date 2022/8/28 18:18
 * @Created by zhengdp
 */
@Data
public class Student {

    private String userName;
    private Integer age;
    private String sex;

    public static Builder builder(){
        return new Builder();
    }

    public static class Builder {
        private String userName;
        private Integer age;
        private String sex;

        public Builder userName(String userName){
            this.userName = userName;
            return this;
        }

        public Builder age (Integer age){
            this.age = age;
            return this;
        }

        public Builder sex(String sex){
            this.sex = sex;
            return this;
        }

        public Student build(){
            Student student = new Student();
            student.sex = this.sex;
            student.age = this.age;
            student.userName = userName;
            return student;
        }
    }
}
